<template>
    <div class="edu-page-warp">
        <el-card shadow="never" body-style="padding: 24px;">
            <el-form :model="queryForm" label-position="left" label-width="0px">
                <el-tabs v-modal="currentIndex" @tab-click="handleClick">
                    <el-tab-pane label="学校/专业维护" name="0">
                        <el-row :gutter="10" style="line-height: 32px;">
                            <el-col :span="4" class="lineClass">
                                <span>辅修年级：</span>
                            </el-col>
                            <el-col :span="4">
                                <el-date-picker
                                    v-model="minorConfig.grade"
                                    value-format="yyyy"
                                    type="year"
                                    placeholder="请选择"
                                    style="width: 100%"
                                    @change="updateConfigValue"
                                    clearable
                                />
                            </el-col>
                        </el-row>
                        <el-row :gutter="20" style="line-height: 32px;">
                            <el-col :span="4">
                                <div class="minorGrade">学院专业配置开关：</div>
                            </el-col>
                            <el-col :span="3">
                                <el-switch
                                    v-model="minorConfig.configSwitch"
                                    active-value="1"
                                    inactive-value="0"
                                    active-text="开"
                                    active-color="#13CE66"
                                    inactive-text="关"
                                    @change="updateConfigValue"
                                ></el-switch>
                            </el-col>
                            <el-col :span="4">
                                <el-form-item
                                    prop="startTime"
                                    class="no-bottom"
                                    style="width:180px"
                                >
                                    <el-date-picker
                                        v-model="minorConfig.configSwitchStartTime"
                                        :disabled="!(minorConfig.configSwitch*1)"
                                        align="right"
                                        type="datetime"
                                        value-format="timestamp"
                                        format="yyyy-MM-dd HH:mm:ss"
                                        style="width:100%"
                                        placeholder="请选择开始日期"
                                        :picker-options="minorConfig.disabledConfigSwitchStartTime"
                                        @change="configSwitchStartTimeChange"
                                        clearable
                                    ></el-date-picker>
                                </el-form-item>
                            </el-col>
                            <el-col
                                :span="2"
                                class="spanStyle"
                                v-if="!!minorConfig.configSwitchStartTime"
                            >
                                <span>~</span>
                            </el-col>
                            <el-col :span="4">
                                <el-form-item prop="endTime" class="no-bottom" style="width: 180px">
                                    <el-date-picker
                                        v-if="minorConfig.configSwitch&&!!minorConfig.configSwitchStartTime"
                                        v-model="minorConfig.configSwitchEndTime"
                                        :disabled="!minorConfig.configSwitch"
                                        align="right"
                                        type="datetime"
                                        value-format="timestamp"
                                        format="yyyy-MM-dd HH:mm:ss"
                                        style="width:100%"
                                        placeholder="请选择结束日期"
                                        :picker-options="minorConfig.disabledConfigSwitchEndTime"
                                        @change="configSwitchEndTimeChange"
                                        clearable
                                    ></el-date-picker>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row :gutter="20" style="line-height: 32px;">
                            <el-col :span="4">
                                <div class="minorGrade">校内外辅修报名开关：</div>
                            </el-col>
                            <el-col :span="3">
                                <el-switch
                                    :span="3"
                                    v-model="minorConfig.signSwitch"
                                    active-value="1"
                                    inactive-value="0"
                                    active-text="开"
                                    active-color="#13CE66"
                                    inactive-text="关"
                                    @change="updateConfigValue"
                                    :disabled="!minorConfig.configSwitchEndTime"
                                ></el-switch>
                            </el-col>
                            <el-col :span="4">
                                <el-form-item
                                    prop="startTime"
                                    class="no-bottom"
                                    style="width: 180px"
                                >
                                    <el-date-picker
                                        v-model="minorConfig.signSwitchStartTime"
                                        :picker-options="minorConfig.disabledSignSwitchStartTime"
                                        type="datetime"
                                        :editable="false"
                                        align="center"
                                        placeholder="请选择开始时间"
                                        format="yyyy-MM-dd HH:mm:ss"
                                        value-format="timestamp"
                                        style="width: 100%"
                                        clearable
                                        :disabled="!(minorConfig.signSwitch*1)"
                                        @change="checkSignSwitchStartTime"
                                    />
                                </el-form-item>
                            </el-col>
                            <el-col
                                :span="2"
                                class="spanStyle"
                                v-if="minorConfig.signSwitch&&!!minorConfig.signSwitchStartTime"
                            >
                                <span>~</span>
                            </el-col>
                            <el-col :span="4">
                                <el-form-item prop="endTime" class="no-bottom" style="width: 180px">
                                    <el-date-picker
                                        v-model="minorConfig.signSwitchEndTime"
                                        :picker-options="minorConfig.disabledSignSwitchEndTime"
                                        v-if="minorConfig.signSwitch&&!!minorConfig.signSwitchStartTime"
                                        type="datetime"
                                        :editable="false"
                                        placeholder="请选择结束时间"
                                        format="yyyy-MM-dd HH:mm:ss"
                                        value-format="timestamp"
                                        align="right"
                                        style="width: 100%"
                                        clearable
                                        :disabled="!minorConfig.configSwitch"
                                        @change="checkSignSwitchEndTime"
                                    />
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row :gutter="20" style="line-height: 32px;">
                            <el-col :span="4">
                                <div class="minorGrade" style="float:left;width: 160px;">校内外辅修查询开关：</div>
                            </el-col>
                            <el-col :span="3">
                                <el-switch
                                    :span="3"
                                    v-model="minorConfig.querySwitch"
                                    active-value="1"
                                    inactive-value="0"
                                    active-text="开"
                                    active-color="#13CE66"
                                    inactive-text="关"
                                    @change="updateConfigValue"
                                    :disabled="!minorConfig.signSwitchEndTime"
                                ></el-switch>
                            </el-col>
                            <el-col :span="4">
                                <el-form-item
                                    prop="startTime"
                                    class="no-bottom"
                                    style="width: 180px"
                                >
                                    <el-date-picker
                                        v-model="minorConfig.querySwitchStartTime"
                                        :picker-options="minorConfig.disabledQuerySwitchStartTime"
                                        type="datetime"
                                        :editable="false"
                                        placeholder="请选择开始时间"
                                        format="yyyy-MM-dd HH:mm:ss"
                                        value-format="timestamp"
                                        align="right"
                                        style="width: 100%"
                                        clearable
                                        :disabled="!(minorConfig.querySwitch*1)"
                                        @change="checkQuerySwitchStartTime"
                                    />
                                </el-form-item>
                            </el-col>
                            <el-col
                                :span="2"
                                class="spanStyle"
                                v-if="minorConfig.querySwitch&&!!minorConfig.querySwitchStartTime"
                            >
                                <span>~</span>
                            </el-col>
                            <el-col :span="4">
                                <el-form-item prop="endTime" class="no-bottom" style="width: 180px">
                                    <el-date-picker
                                        v-model="minorConfig.querySwitchEndTime"
                                        :picker-options="minorConfig.disabledQuerySwitchEndTime"
                                        v-if="minorConfig.querySwitch&&!!minorConfig.querySwitchStartTime"
                                        type="datetime"
                                        :editable="false"
                                        placeholder="请选择结束时间"
                                        format="yyyy-MM-dd HH:mm:ss"
                                        value-format="timestamp"
                                        align="right"
                                        style="width: 100%"
                                        clearable
                                        @change="checkQuerySwitchEndTime"
                                        :disabled="!minorConfig.configSwitch || !minorConfig.signSwitch"
                                    />
                                </el-form-item>
                            </el-col>
                        </el-row>
                    </el-tab-pane>
                    <el-tab-pane label="辅修专业管理" name="1">
                        <el-card shadow="never" body-style="padding: 24px; padding-bottom: 6px;">
                            <div style="height:50px">
                                <div
                                    class="edu-page-title pull-left"
                                    style="display:flex;flex-direction:row;align-items:center"
                                >
                                    <span>{{$t('message.filterCondition')}}</span>
                                    <div
                                        style="display:flex;flex-direction:row;align-items:center"
                                        @click="fold"
                                    >
                                        <i
                                            :class="filterBlockStatus?'el-icon-arrow-down':'el-icon-arrow-up'"
                                            style="font-size:13px;color:#3A7FE8;margin-right:5px;font-weight:bold;"
                                        ></i>
                                        <span
                                            v-if="filterBlockStatus"
                                            style="color:#3A7FE8;font-size:12px;"
                                        >收起</span>
                                        <span v-else style="color:#3A7FE8;font-size:12px;">展开</span>
                                    </div>
                                </div>
                                <div class="pull-right">
                                    <el-form-item class="float-right no-bottom no-right">
                                        <el-button size="mini" @click="search()">重置</el-button>
                                        <el-button size="mini" type="primary" @click="search(1)">筛选</el-button>
                                    </el-form-item>
                                </div>
                            </div>
                            <el-collapse-transition>
                                <el-form
                                    ref="queryForm"
                                    :model="query"
                                    label-position="right"
                                    label-width="80px"
                                    v-show="filterBlockStatus"
                                >
                                    <el-row :gutter="20">
                                        <el-col :span="8">
                                            <el-form-item
                                                label="辅修学校:"
                                                prop="minorUniversity"
                                                class="no-bottom"
                                            >
                                                <el-select
                                                    :clearable="false"
                                                    v-model="queryParams.minorUniversity"
                                                    placeholder="选择辅修学校"
                                                    @change="search(1)"
                                                    filterable
                                                    style="width: 100%"
                                                >
                                                    <el-option
                                                        v-for="item in options.minorUniversity"
                                                        :key="item.value"
                                                        :label="item.label"
                                                        :value="item.value"
                                                    />
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                        <!-- <el-col :span="8">
                                            <el-form-item
                                                label="进阶层次:"
                                                prop="advancedLevel"
                                                class="no-bottom"
                                            >
                                                <el-select
                                                    clearable
                                                    v-model="queryParams.advancedLevel"
                                                    placeholder="选择进阶层次"
                                                    filterable
                                                    style="width: 100%"
                                                >
                                                    <el-option
                                                        v-for="item in options.advancedLevel"
                                                        :key="item.value"
                                                        :label="item.label"
                                                        :value="item.value"
                                                    />
                                                </el-select>
                                            </el-form-item>
                                        </el-col> -->
                                        <el-col :span="8">
                                            <el-form-item
                                                label="是否启用:"
                                                prop="status"
                                                class="no-bottom"
                                            >
                                                <el-select
                                                    clearable
                                                    v-model="queryParams.status"
                                                    placeholder="请选择"
                                                    filterable
                                                    style="width: 100%"
                                                >
                                                    <el-option
                                                        v-for="item in options.status"
                                                        :key="item.value"
                                                        :label="item.label"
                                                        :value="item.value"
                                                    />
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                    </el-row>
                                </el-form>
                            </el-collapse-transition>
                        </el-card>
                        <el-card>
                            <div>
                                <el-col :span="8" style="width:240px">
                                    <el-form-item class="no-bottom">
                                        <el-select
                                            v-model="schoolId"
                                            placeholder="全部学校"
                                            filterable
                                            clearable
                                            @change="chooseCampus"
                                            style="width: 100%"
                                        >
                                            <el-option
                                                v-for="item in options.minorUniversity"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value"
                                            />
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                            </div>
                            <div class="float-right">
                                <el-button
                                    :disabled="!isOnCampus"
                                    type="primary"
                                    @click="!isOnCampus?null:addMinorProfession()"
                                >{{ $t('common.btn.add') }}</el-button>
                            </div>
                            <edu-table
                                :data="tableData.list"
                                :order="false"
                                :selection="false"
                                style="width: 100%"
                                @page-change="pageChange"
                                :total="tableData.total_"
                                :pageSize="queryParams.pageSize_"
                            >
                                <el-table-column
                                    label="专业代码"
                                    prop="majorCode"
                                    show-overflow-tooltip
                                />
                                <el-table-column
                                    label="专业名称"
                                    min-width="90"
                                    prop="majorNameZh"
                                    show-overflow-tooltip
                                />
                                <el-table-column
                                    label="辅修学校"
                                    prop="schoolName"
                                    show-overflow-tooltip
                                />
                                 <el-table-column
                                    :label="$t('minor.major.college')"
                                    prop="faultyCodeI18n"
                                    show-overflow-tooltip
                                    min-width="120"
                                    v-if="minorUniversityDefault && queryParams.minorUniversity == minorUniversityDefault"
                                />
                                <!-- <el-table-column
                                    label="进阶层次"
                                    prop="advancedLevelName"
                                    show-overflow-tooltip
                                /> -->
                                <el-table-column
                                    label="专业介绍"
                                    prop="minorIntroduceZh"
                                    show-overflow-tooltip
                                />
                                <el-table-column
                                    label="招生人数"
                                    prop="enrollmentNum"
                                    show-overflow-tooltip
                                    v-if='!minorUniversityDefault || queryParams.minorUniversity != minorUniversityDefault'
                                />
                                <template v-if="minorUniversityDefault && queryParams.minorUniversity == minorUniversityDefault">
                                    <el-table-column
                                        label="微专业招生人数"
                                        prop="wzyNum"
                                        width="130"
                                        show-overflow-tooltip
                                    />
                                    <el-table-column
                                        label="辅修专业招生人数"
                                        prop="fxzyNum"
                                        width="140"
                                        show-overflow-tooltip
                                    />
                                    <el-table-column
                                        label="辅修学位招生人数"
                                        prop="fxxwNum"
                                         width="140"
                                        show-overflow-tooltip
                                    />
                                </template>
                                <el-table-column label="状态" prop="status" show-overflow-tooltip>
                                    <template slot-scope="scope">
                                        <el-tag
                                            v-if="scope.row.status*1 == 1"
                                            type="success"
                                            size="mini"
                                        >启用</el-tag>
                                        <el-tag v-else type="danger" size="mini">停用</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column :label="$t('common.text.operation')" width="100px">
                                    <template slot-scope="scope">
                                        <el-button
                                            type="text"
                                            size="mini"
                                            @click="operate(1,scope.row)"
                                        >{{ $t('common.btn.edit') }}</el-button>
                                        <el-button
                                            type="text"
                                            size="mini"
                                            @click="operate(0,scope.row)"
                                        >{{ $t('common.btn.delete') }}</el-button>
                                    </template>
                                </el-table-column>
                            </edu-table>
                        </el-card>
                    </el-tab-pane>
                </el-tabs>
            </el-form>
        </el-card>

        <!-- 新增/编辑辅修专业（校内）-->
        <el-dialog
            :visible.sync="innerMinorProfessionDialog"
            :title="dialogDirection=='add'?`新增辅修专业(${minorConfig.grade}-${schoolName})`:`编辑辅修专业(${minorConfig.grade}-${schoolName})`"
            class="form-content"
            width="45%"
            :close-on-click-modal="false"
            close="this.innerMinorProfessionDialog=false"
        >
            <el-form
                ref="inCampusQueryParams"
                :rules="inCampusRules"
                :model="inCampusQueryParams"
                label-width="150px"
                label-position="right"
                size="mini"
            >
                <!-- <el-row style="height: 50px;" :gutter="20">
                    <el-col :span="16">
                        <el-form-item label="进阶层次" prop="advancedLevelCode">
                            <el-select
                                v-model="inCampusQueryParams.advancedLevelCode"
                                style="width: 100%;margin-left:10px"
                                placeholder="请选择"
                                clearable
                                @change="advancedLevelChange"
                            >
                                <el-option
                                    v-for="item in options.advancedLevel"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                />
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row> -->
                <!-- 与需求人员沟通后，暂且屏蔽此处 -->
                <!-- <el-row style="height: 50px;">
                    <el-col :span="24">
                        <el-form-item label="微专业培养方案" prop="minorProfessCultureScheme">
                            <el-select
                                v-model="addMinorProfessionForm.minorProfessCultureScheme"
                                placeholder="全部"
                                clearable
                            />
                            <el-option
                                v-for="item in options.minorProfessCultureScheme"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value"
                            />
                        </el-form-item>
                    </el-col>
                </el-row>-->
                <el-row style="height: 50px;" :gutter="20">
                    <el-col :span="16">
                        <el-form-item :label="$t('minor.major.college')" prop="faultyCode">
                            <el-select
                                v-model="inCampusQueryParams.faultyCode"
                                style="width: 100%;margin-left:10px"
                                clearable
                                @change="faultyChange"
                            >
                                <el-option
                                    v-for="item in options.faulty"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                />
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="height: 50px;" :gutter="20">
                    <el-col :span="16">
                        <el-form-item label="专业名称" prop="majorCode">
                            <el-select
                                v-model="inCampusQueryParams.majorCode"
                                style="width: 100%;margin-left:10px"
                                clearable
                            >
                                <el-option
                                    v-for="item in options.profession"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                />
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="height: 50px;" :gutter="20">
                    <el-col :span="16">
                        <el-form-item label="专业代码" prop="majorCode">
                            <el-input
                                style="margin-left:10px"
                                v-model="inCampusQueryParams.majorCode"
                                :value="inCampusQueryParams.majorCode"
                                disabled="true"
                            />
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="height: 50px;" :gutter="20">
                    <el-col :span="16">
                        <el-form-item label="是否启用" prop="status">
                            <el-switch
                                style="margin-left:10px"
                                v-model="inCampusQueryParams.status"
                                inactive-value="0"
                                active-value="1"
                                active-color="#13ce66"
                                active-text="是"
                                inactive-text="否"
                            />
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="height: 50px;" :gutter="20">
                    <el-col :span="16">
                        <el-form-item label="微专业招生人数" prop="wzyNum">
                            <el-input
                                type="text"
                                style="margin-left:10px"
                                v-model.trim="inCampusQueryParams.wzyNum"
                                :value="inCampusQueryParams.wzyNum"
                            />
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="height: 50px;" :gutter="20">
                    <el-col :span="16">
                        <el-form-item label="辅修专业招生人数" prop="fxzyNum"> 
                            <el-input
                                type="text"
                                style="margin-left:10px"
                                v-model.trim="inCampusQueryParams.fxzyNum"
                                :value="inCampusQueryParams.fxzyNum"
                            />
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="height: 50px;" :gutter="20">
                    <el-col :span="16">
                        <el-form-item label="辅修学位招生人数" prop="fxxwNum">
                            <el-input
                                type="text"
                                style="margin-left:10px"
                                v-model.trim="inCampusQueryParams.fxxwNum"
                                :value="inCampusQueryParams.fxxwNum"
                            />
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="height: 50px;" :gutter="20">
                    <el-col :span="16">
                        <el-form-item label="专业介绍" prop="minorIntroduceZh">
                            <el-input
                                style="margin-left:10px"
                                v-model="inCampusQueryParams.minorIntroduceZh"
                                type="textarea"
                                :autosize="{ minRows: 2, maxRows: 4}"
                            />
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="innerMinorProfessionDialog = false">{{ $t("message.cancel") }}</el-button>
                <el-button
                    type="primary"
                    @click="submit(0,'inCampusQueryParams')"
                >{{ $t("message.confirm") }}</el-button>
            </span>
        </el-dialog>

        <!-- 新增/编辑辅修专业（校外）-->
        <el-dialog
            :visible.sync="outterMinorProfessionDialog"
            :title="dialogDirection=='add'?`新增辅修专业(${minorConfig.grade}-${schoolName})`:`编辑辅修专业(${minorConfig.grade}-${schoolName})`"
            class="form-content"
            width="45%"
            :close-on-click-modal="false"
            close="this.outterMinorProfessionDialog=false"
        >
            <el-form
                ref="outCampusQueryParams"
                :rules="outCampusRules"
                :model="outCampusQueryParams"
                label-position="right"
                label-width="96px"
            >
                <el-row style="height: 50px;" :gutter="20">
                    <el-col :span="16">
                        <el-form-item label="专业代码" prop="majorCode">
                            <el-input
                                style="margin-left:10px"
                                placeholder="请输入专业代码"
                                v-model="outCampusQueryParams.majorCode"
                                :value="outCampusQueryParams.majorCode"
                            />
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="height: 50px;" :gutter="20">
                    <el-col :span="16">
                        <el-form-item label="专业名称" prop="majorNameZh">
                            <el-input
                                style="margin-left:10px"
                                placeholder="请输入专业名称"
                                v-model="outCampusQueryParams.majorNameZh"
                                :value="outCampusQueryParams.majorNameZh"
                            />
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="height: 50px;" :gutter="20">
                    <el-col :span="16">
                        <el-form-item label="招生人数" prop="enrollmentNum">
                            <!-- <el-input-number v-model="outCampusQueryParams.enrollmentNum" @change="handleChange" :min="1" :max="10"></el-input-number> -->
                            <el-input
                                type="text"
                                style="margin-left:10px"
                                v-model.trim="outCampusQueryParams.enrollmentNum"
                            />
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="height: 50px;">
                    <el-col :span="16">
                        <el-form-item label="是否启用" prop="status">
                            <el-switch
                                v-model="outCampusQueryParams.status"
                                active-value="1"
                                inactive-value="0"
                                active-color="#13ce66"
                                active-text="是"
                                inactive-text="否"
                            />
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="16">
                        <el-form-item label="专业介绍" prop="minorIntroduceZh">
                            <el-input
                                v-model="outCampusQueryParams.minorIntroduceZh"
                                type="textarea"
                                :autosize="{ minRows: 2, maxRows: 4}"
                            />
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="outterMinorProfessionDialog = false">{{ $t("message.cancel") }}</el-button>
                <el-button
                    type="primary"
                    @click="submit('1','outCampusQueryParams')"
                >{{ $t("message.confirm") }}</el-button>
            </span>
        </el-dialog>
    </div>
</template>


<script>
import { queryDic } from "common/src/api/dictionary";
import Calendars from "common/src/api/calendars.js";
import { getSessionUser } from "common/src/api/session.js";
import UTILS from "common/src/utils/utils";
import {
    updateMinorConfigInfo,
    queryMinorProfessionInfo,
    queryUniversityDic,
    //queryAdvancedLevelDic,
    deleteMinorProfessionInfo,
    editMinorProfessionInfo,
    queryMinorConfigInfo,
    querySchemeFaultyProfession,
    addMinorProfessionInfo,
    queryIsSign,
    initCampusProfession
} from "common/src/api/minor/minorSign.js";

export default {
    data() {
        let fieldMap = {
            'wzyNum': '请输入合理的微专业招生人数',
            'fxzyNum': '请输入合理的辅修专业招生人数',
            'fxxwNum': '请输入合理的辅修学位招生人数',
            'enrollmentNum': '请输入合理的招生人数'
        }
        var checkEnrollmentNum = (rule, value, callback) => {
            var reg = /^(0|[1-9]\d*)$/;
            if (value && !reg.test(value)) {
                callback(new Error("请输入数字值"));
            } else {
                if (value && value.length > 4) {
                    let msg = fieldMap[rule.field];
                    msg && callback(new Error(msg)); 
                }else {
                    callback();
                }
            }
        };
        return {
            isOnCampus: "", //判断是否本校，用来判断模态框的显示
            schoolId: "",
            schoolName: "",
            innerMinorProfessionDialog: false,
            outterMinorProfessionDialog: false,
            filterBlockStatus: true,
            dialogDirection: "add",
            currentIndex: 0,
            inCampusQueryParams: {
                //advancedLevelCode: "",
                faultyCode: "",
                majorCode: "",
                majorNameZh: "",
                status: "1",
                minorIntroduceZh: "",
                wzyNum: '',
                fxzyNum: '',
                fxxwNum: ''
            },
            outCampusQueryParams: {
                majorCode: "",
                majorName: "",
                enrollmentNum: "", //招生人数
                status: "1",
                minorIntroduceZh: "",
                advancedLevelCode: ""
            },
            minorConfig: {
                grade: "",
                configSwitch: false,
                configSwitchStartTime: "",
                configSwitchEndTime: "",
                disabledConfigSwitchStartTime: {
                    disabledDate(time) {
                        return time.getTime() < Date.now() - 8.64e7;
                    }
                },
                disabledConfigSwitchEndTime: this.disabledTime(1),
                signSwitch: false,
                signSwitchStartTime: "",
                signSwitchEndTime: "",
                disabledSignSwitchStartTime: this.disabledTime(2),
                disabledSignSwitchEndTime: this.disabledTime(3),
                querySwitch: false,
                querySwitchStartTime: "",
                querySwitchEndTime: "",
                disabledQuerySwitchStartTime: this.disabledTime(4),
                disabledQuerySwitchEndTime: this.disabledTime(5)
            },
            addMinorProfessionForm: {
                advancedLevel: "",
                minorProfessCultureScheme: "",
                faculty: "",
                professsionName: "",
                professsionCode: "",
                num: 0,
                status: "",
                professsionDesc: ""
            },
            queryParams: {
                schoolId: "",
                //advancedLevelCode: "",
                pageNum_: 1,
                pageSize_: 20,
                minorUniversity: "",
                //advancedLevel: "",
                status: ""
            },
            minorUniversityDefault: '',
            options: {
                minorUniversity: [],
                //advancedLevel: [],
                //copyAdvancedLevel: [],
                status: [
                    {
                        value: "0",
                        label: "否"
                    },
                    {
                        value: "1",
                        label: "是"
                    }
                ],
                minorProfessCultureScheme: [],
                faulty: [],
                profession: []
            },
            tableData: {},

            inCampusRules: {
                // advancedLevelCode: [
                //     {
                //         required: true,
                //         message: "请选择进阶层次",
                //         trigger: "change"
                //     }
                // ],
                faultyCode: [
                    {
                        required: true,
                        message: this.$t('minor.tip.collegeTip'),
                        trigger: "change"
                    }
                ],
                majorCode: [
                    {
                        required: true,
                        message: "请选择专业名称",
                        trigger: "change"
                    }
                ],
                status: [
                    {
                        required: true
                    }
                ],
                wzyNum: [
                    {
                        validator: checkEnrollmentNum,
                        trigger: "blur"
                    }
                ],
                fxzyNum: [
                    {
                        validator: checkEnrollmentNum,
                        trigger: "blur"
                    }
                ],
                fxxwNum: [
                    {
                        validator: checkEnrollmentNum,
                        trigger: "blur"
                    }
                ]
            },
            outCampusRules: {
                majorCode: [
                    {
                        required: true,
                        message: "专业代码不能为空",
                        trigger: "blur"
                    }
                ],
                majorNameZh: [
                    {
                        required: true,
                        message: "专业名称不能为空",
                        trigger: "blur"
                    }
                ],
                // enrollmentNum: [
                //     {
                //         validator: checkEnrollmentNum,
                //         trigger: "blur"
                //     }
                // ],
                status: [
                    {
                        required: true
                    }
                ],
                enrollmentNum: [
                    {
                        required: true,
                        message: "招生人数不能为空",
                        trigger: "blur"
                    },
                    {
                        validator: checkEnrollmentNum,
                        trigger: "blur"
                    }
                ]
            }
        };
    },
    watch: {
        // "queryParams.minorUniversity": function(val, oldval) {
        //     this.queryParams.advancedLevel = "";
        //     if (!val) {
        //         this.options["advancedLevel"] = this.options[
        //             "copyAdvancedLevel"
        //         ];
        //     } else {
        //         const campusMark = this.options["minorUniversity"].find(
        //             e => e.value * 1 == val * 1
        //         ).isOnCampus;
        //         this.options["advancedLevel"] = this.options[
        //             "copyAdvancedLevel"
        //         ].filter(e => {
        //             return e.isOnCampus * 1 == campusMark * 1;
        //         });
        //     }
        // }
        // "inCampusQueryParams.advancedLevelCode": function(val, oldval) {
        //     console.log(val,oldval)
        //     if (!!val&&val!==oldval) {
        //         this.inCampusQueryParams.faultyCode="";
        //         this.inCampusQueryParams.majorCode="";
        //         this.watchData();
        //     }else if(!!oldval&&!value){
        //         this.watchData();
        //     }
        // }
        // "inCampusQueryParams.faultyCode":function(val,oldval){
        //     if(!val||val!==oldval){
        //         this.watchData();
        //     }
        // }
    },
    created() {
        if (!this.$checkMinor()) return;
        this.initConfig();
        //请求配置数据
        // queryMinorConfigInfo()
        //     .then(res => {
        //         if (res.code == 200) {
        //             this.minorConfig.grade = res.data[0].grade;
        //             this.minorConfig.configSwitch = res.data[0].configSwitch;
        //             this.minorConfig.configSwitchEndTime =
        //                 res.data[0].configSwitchEndTime;
        //             this.minorConfig.configSwitchStartTime =
        //                 res.data[0].configSwitchStartTime;
        //             this.minorConfig.querySwitch = res.data[0].querySwitch;
        //             this.minorConfig.signSwitch = res.data[0].signSwitch;
        //             this.minorConfig.querySwitchStartTime =
        //                 res.data[0].querySwitchStartTime;
        //             this.minorConfig.querySwitchEndTime =
        //                 res.data[0].querySwitchEndTime;
        //             this.minorConfig.signSwitchEndTime =
        //                 res.data[0].signSwitchEndTime;
        //             this.minorConfig.signSwitchStartTime =
        //                 res.data[0].signSwitchStartTime;
        //             this.minorConfig.recruitStatus = res.data[0].recruitStatus;
        //         }
        //     })
        //     .catch(err => {
        //         console.log(err);
        //     });
    },
    methods: {
        initConfig() {
            queryMinorConfigInfo()
                .then(res => {
                    if (res.code == 200) {
                        this.minorConfig.grade = res.data[0].grade;
                        this.minorConfig.configSwitch = res.data[0].configSwitch;
                        this.minorConfig.configSwitchEndTime =
                            res.data[0].configSwitchEndTime;
                        this.minorConfig.configSwitchStartTime =
                            res.data[0].configSwitchStartTime;
                        this.minorConfig.querySwitch = res.data[0].querySwitch;
                        this.minorConfig.signSwitch = res.data[0].signSwitch;
                        this.minorConfig.querySwitchStartTime =
                            res.data[0].querySwitchStartTime;
                        this.minorConfig.querySwitchEndTime =
                            res.data[0].querySwitchEndTime;
                        this.minorConfig.signSwitchEndTime =
                            res.data[0].signSwitchEndTime;
                        this.minorConfig.signSwitchStartTime =
                            res.data[0].signSwitchStartTime;
                        this.minorConfig.recruitStatus = res.data[0].recruitStatus;
                    }
                })
            .catch(err => {
                console.log(err);
            });
        },
        chooseCampus(item) {
            if (!item) {
                this.isOnCampus = "";
            } else {
                //此方法用来判断校内/校外新增使用 "0" ：校内，"1"":校外
                const uty = this.options.minorUniversity.find(
                    e => e.value * 1 == item
                );
                this.isOnCampus = uty.isOnCampus;
                this.schoolName = uty.label;
            }
        },
        // advancedLevelChange() {
        //     this.inCampusQueryParams.faultyCode = "";
        //     this.inCampusQueryParams.majorCode = "";
        //     this.watchData();
        // },
        faultyChange() {
            this.inCampusQueryParams.majorCode = "";
            this.watchData(false, true);
        },
        watchData(faultyFlag = true, professionFlag = true) {
            const _this = this;
            let dealData =  {};
            if (professionFlag) {
                this.options.profession = [];
                dealData.profession = "profession";
            }
            if (faultyFlag) {
                this.options.faulty = [];
                dealData.faulty = "faulty";
            }
            querySchemeFaultyProfession({
                faultyCode: !faultyFlag && _this.inCampusQueryParams.faultyCode || '',
                //advancedLevelCode: _this.inCampusQueryParams.advancedLevelCode
            })
                .then(res => {
                    if (res.code == 200) {
                        UTILS.fillSelect(
                            dealData,
                            res.data,
                            _this.options
                        );
                    }
                })
                .catch(err => {
                    console.log(err);
                });
        },
        async search(type) {
            // type 不传 重置  type=1 筛选
            if (!this.$checkMinor()) return;
            if (!type) {
                this.queryParams = {
                    schoolId: "",
                    //advancedLevelCode: "",
                    pageNum_: 1,
                    pageSize_: 20,
                    minorUniversity: this.minorUniversityDefault,
                    //advancedLevel: "",
                    status: ""
                };
            }
            this.initPage();
        },
        //新增辅修专业
        addMinorProfession() {
            this.dialogDirection = "add";
            if (!(this.isOnCampus * 1)) {
                // 0 本校新增
                this.innerMinorProfessionDialog = true;
                this.$refs["inCampusQueryParams"] &&
                    this.$refs["inCampusQueryParams"].resetFields();
                // this.options["advancedLevel"] = this.options[
                //     "copyAdvancedLevel"
                // ].filter(e => !(e.isOnCampus * 1));
                this.inCampusQueryParams = {
                    //advancedLevelCode: "",
                    faultyCode: "",
                    majorCode: "",
                    majorNameZh: "",
                    status: "1",
                    minorIntroduceZh: "",
                    enrollmentNum: ""
                };
                this.options.profession = [];
                this.watchData(true, false);
            } else {
                //!0校外新增
                this.outterMinorProfessionDialog = true;
                this.$refs["outCampusQueryParams"] &&
                    this.$refs["outCampusQueryParams"].resetFields();
                // this.options["advancedLevel"] = this.options[
                //     "copyAdvancedLevel"
                // ].filter(e => e.isOnCampus * 1 == 1);
                this.outCampusQueryParams = {
                    majorCode: "",
                    majorName: "",
                    enrollmentNum: "", //招生人数
                    status: "1",
                    minorIntroduceZh: ""
                };
            }
        },
        async operate(type = 0, item) {
            this.dialogDirection = "edit";
            this.schoolName = item.schoolName;
            // type=0 删除 type=1 修改
            const _this = this;
            try {
                if (!type) {
                    let tip = '';
                    queryIsSign({
                        minorGrade: this.minorConfig.grade,
                        minorProfession: item.majorCode
                    }).then(resp => {
                        if (resp.code == 200) {
                            tip = resp.msg;
                            tip = tip ? `${tip}, ` : '';
                        }
                    }).finally(async  response => {
                        const res = await _this.$confirm(
                            `${tip}确认删除此条专业记录吗, 是否继续?`,
                            "提示",
                            {
                                confirmButtonText: "确定",
                                cancelButtonText: "取消",
                                type: "warning"
                            }
                        );
                        if (res == "confirm") {
                            const result = await deleteMinorProfessionInfo(item);
                            if (result.code == 200) {
                                this.$message({
                                    message: this.$t("common.tips.deleteSuccess"),
                                    type: "success"
                                });
                            }
                            _this.initPage();
                        }
                    })
                } else {
                    //校内编辑
                    if (item && !(item.isOnCampus * 1)) {
                        _this.$refs["inCampusQueryParams"] &&
                            _this.$refs["inCampusQueryParams"].resetFields();
                        _this.innerMinorProfessionDialog = true;
                        _this.inCampusQueryParams = _.cloneDeep(item);
                        _this.watchData(true, false);
                        _this.watchData(false, true);
                        // _this.options["advancedLevel"] = _this.options[
                        //     "copyAdvancedLevel"
                        // ].filter(e => {
                        //     return e.isOnCampus * 1 == 0;
                        // });
                    } else {
                        _this.$refs["outCampusQueryParams"] &&
                            _this.$refs["outCampusQueryParams"].resetFields();
                        _this.outterMinorProfessionDialog = true;
                        _this.outCampusQueryParams = _.cloneDeep(item);
                        // _this.options["advancedLevel"] = _this.options[
                        //     "copyAdvancedLevel"
                        // ].filter(e => {
                        //     return e.isOnCampus * 1 == 1;
                        // });
                    }
                }
            } catch (err) {
                console.log(err);
            }
        },
        async submit(type, formName) {
            let weakMsg;
            if (!type) {
                if (!(this.inCampusQueryParams.wzyNum * 1) && !(this.inCampusQueryParams.fxzyNum * 1)  && !(this.inCampusQueryParams.fxxwNum * 1)) {
                    weakMsg = true;
                }
            }
            // type 0:校内新增/修改  1：校外新增/修改inCampusRuleForm
            this.$refs[formName].validate(valid => {
                if (!valid) {
                    throw "valid err!";
                }
            });
            try {
                if (this.dialogDirection == "edit") {
                    //编辑
                    let params = {};
                    if (!type) {
                        params = this.inCampusQueryParams;
                        params.majorNameZh = this.options.profession.find(e => e.value == this.inCampusQueryParams.majorCode).label || '';      
                    } else {
                        params = this.outCampusQueryParams;
                    }
                    if (weakMsg) {
                        await this.$confirm(
                            "暂未设置招生人数, 是否继续?",
                            "提示",
                            {
                                confirmButtonText: "确定",
                                cancelButtonText: "取消",
                                type: "warning"
                            }
                        ); 
                    }
                    const result = await editMinorProfessionInfo(params);
                    if (result.code == 200) {
                        this.$message({
                            message: this.$t("minor.tip.editSuccess"),
                            type: "success"
                        });
                        if (!type) {
                            this.innerMinorProfessionDialog = false;
                        } else {
                            this.outterMinorProfessionDialog = false;
                        }
                        this.initPage();
                    }
                } else {
                    let params = {};
                    if (!type) {
                        params = Object.assign(this.inCampusQueryParams, {
                            schoolId: this.schoolId,
                            isOnCampus: this.isOnCampus,
                            majorNameZh:
                                this.options.profession.length > 0
                                    ? this.options.profession.find(
                                          e =>
                                              e.value ==
                                              this.inCampusQueryParams.majorCode
                                      ).label
                                    : ""
                        });
                    } else {
                        params = Object.assign(this.outCampusQueryParams, {
                            schoolId: this.schoolId,
                            isOnCampus: this.isOnCampus
                            //advancedLevelCode: ""
                        });
                    }
                    if (weakMsg) {
                        await this.$confirm(
                            "暂未设置招生人数, 是否继续?",
                            "提示",
                            {
                                confirmButtonText: "确定",
                                cancelButtonText: "取消",
                                type: "warning"
                            }
                        ); 
                    }
                    params.minorGrade = this.minorConfig.grade;
                    const result = await addMinorProfessionInfo(params);
                    if (result.code == 200) {
                        this.$message({
                            message: this.$t("minor.tip.addSuccess"),
                            type: "success"
                        });
                        if (!type) {
                            this.innerMinorProfessionDialog = false;
                        } else {
                            this.outterMinorProfessionDialog = false;
                        }
                        this.initPage();
                    }
                }
            } catch (err) {
                console.log(err);
            }
        },
        fold() {
            this.filterBlockStatus = !this.filterBlockStatus;
        },
        //页签切换
        handleClick(tab) {
            this.currentIndex = tab.index * 1;
            if (tab.index * 1 == 1) {
                this.initOptions();
            }else {
                this.initConfig();
            }
        },
        // 初始化列表数据
        async initPage() {
            const obj = Object.assign(this.queryParams, {
                schoolId: this.queryParams.minorUniversity,
                minorGrade: this.minorConfig.grade
                // advancedLevelCode: this.queryParams.advancedLevel
            });
            try {
                const result = await queryMinorProfessionInfo(obj);
                this.loading = false;
                if (result.code === 200) {
                    this.tableData = result.data.list
                        ? result.data
                        : { list: [] };
                }
            } catch (err) {
                this.loading = false;
            }
        },

        // 初始化下拉框
        async initOptions() {
            this.options["minorUniversity"] = [];
            try {
                // 查询辅修学校
                const unDic = await queryUniversityDic();
                if (unDic.code == 200) {
                    unDic.data.length > 0 &&
                        unDic.data.forEach(e => {
                            this.options["minorUniversity"].push({
                                label: e.minorUniversityName,
                                value: e.minorUniversityCode,
                                isOnCampus: e.isOnCampus
                            });
                            if (e.minorUniversityCode == 10001) {
                                this.minorUniversityDefault = e.minorUniversityCode;
                                this.queryParams.minorUniversity = this.minorUniversityDefault;
                            }
                        });
                }
                // 查询进阶层次
                // const adlDic = await queryAdvancedLevelDic();
                // if (adlDic.code == 200) {
                //     const list = [];
                //     adlDic.data.length > 0 &&
                //         adlDic.data.forEach(e => {
                //             list.push({
                //                 label: e.advancedLevelName,
                //                 value: e.advancedLevelCode,
                //                 isOnCampus: e.sourceId
                //             });
                //         });
                //     this.options["advancedLevel"] = list;
                //     //此数组作为选择学校后过滤进阶层次使用
                //     this.options["copyAdvancedLevel"] = _.cloneDeep(list);
                // }
            } catch (err) {
                console.log(err);
            }
            // 请求列表数据
            let {code} = await initCampusProfession({minorGrade: this.minorConfig.grade});
            if (code == 200) {
                this.initPage();
            }
        },

        pageChange(page) {
            this.queryParams.pageNum_ = page.pageNum;
            this.queryParams.pageSize_ = page.pageSize;
            this.initPage();
        },
        getOptions() {
            let fullYear = new Date().getFullYear() + 5;
            for (let i = 10; i > 0; i--) {
                this.options.gradeList.push({
                    value: fullYear - i,
                    label: fullYear - i
                });
            }
        },
        //此方法控制日期时间开关显示及清空与其关联的参数
        updateConfigValue() {
            if (!(this.minorConfig.configSwitch * 1)) {
                this.minorConfig = Object.assign(this.minorConfig, {
                    configSwitchStartTime: "",
                    configSwitchEndTime: "",
                    signSwitch: "0",
                    signSwitchStartTime: "",
                    signSwitchEndTime: "",
                    querySwitch: "0",
                    querySwitchStartTime: "",
                    querySwitchEndTime: ""
                });
            } else if (!(this.minorConfig.signSwitch * 1)) {
                this.minorConfig = Object.assign(this.minorConfig, {
                    signSwitchStartTime: "",
                    signSwitchEndTime: "",
                    querySwitch: "0",
                    querySwitchStartTime: "",
                    querySwitchEndTime: ""
                });
            } else if (!(this.minorConfig.querySwitch * 1)) {
                this.minorConfig = Object.assign(this.minorConfig, {
                    querySwitch: "0",
                    querySwitchStartTime: "",
                    querySwitchEndTime: ""
                });
            }
            updateMinorConfigInfo(this.minorConfig);
        },
        configSwitchStartTimeChange() {
            if (!!this.minorConfig.configSwitchEndTime) {
                if (this.minorConfig.configSwitchStartTime >= this.minorConfig.configSwitchEndTime) {
                    this.$message({
                        type: "warning",
                        message: '配置开始时间不能大于配置结束时间'
                    });
                    this.initConfig();
                }else {
                    if (!this.minorConfig.configSwitchStartTime) {
                        this.minorConfig.configSwitchEndTime = '';
                        this.$message({
                            type: "warning",
                            message: '请选择配置开始时间'
                        });
                    }else {
                        this.updateConfigValue();
                    }
                }
            }else {
                this.updateConfigValue();
            }
        },
        configSwitchEndTimeChange() {
            //此判断在学院专业配置开关结束时间基础上增加一天时间
            // if (!!this.minorConfig.configSwitchEndTime) {
            //     this.minorConfig.configSwitchEndTime =
            //         this.minorConfig.configSwitchEndTime +
            //         (24 * 60 * 60 * 1000 - 1);
            // }
            //将报名开关关闭、开始时间置为空
            this.minorConfig.signSwitch = false;
            this.minorConfig.signSwitchStartTime = "";
            //将查询开关关闭、开始时间置为空
            this.minorConfig.querySwitch = false;
            this.minorConfig.querySwitchStartTime = "";
            this.updateConfigValue();
        },
        //此方法处理开始时间和结束时间的关系：开始<结束
        disabledTime(type) {
            let _this = this;
            if (type == 1) {
                return {
                    disabledDate(time) {
                        return (
                            time.getTime() <
                            _this.minorConfig.configSwitchStartTime
                        );
                    }
                };
            } else if (type == 2) {
                return {
                    disabledDate(time) {
                        return (
                            time.getTime() <
                            _this.minorConfig.configSwitchEndTime
                        );
                    }
                };
            } else if (type == 3) {
                return {
                    disabledDate(time) {
                        return (
                            time.getTime() <
                            _this.minorConfig.signSwitchStartTime
                        );
                    }
                };
            } else if (type == 4) {
                return {
                    disabledDate(time) {
                        return (
                            time.getTime() < _this.minorConfig.signSwitchEndTime
                        );
                    }
                };
            } else if (type == 5) {
                return {
                    disabledDate(time) {
                        return (
                            time.getTime() <
                            _this.minorConfig.querySwitchStartTime
                        );
                    }
                };
            }
        },
        checkSignSwitchStartTime() {
            let endTime = this.minorConfig.configSwitchStartTime;
            //先校验报名开始时间是否大于学院设置的结束时间
            if (this.minorConfig.signSwitchStartTime <= endTime) {
                this.$message({
                    type: "warning",
                    message: this.$t("minor.tip.signConfigError")
                });
                //将开始时间清空
                this.minorConfig.signSwitchStartTime = "";
                this.minorConfig.signSwitchEndTime = "";
                //将查询开关关闭、开始时间置为空
                this.minorConfig.querySwitch = false;
                this.minorConfig.querySwitchStartTime = "";
            }
            if (!!this.minorConfig.signSwitchEndTime) {
                if (
                    this.minorConfig.signSwitchEndTime <=
                    this.minorConfig.signSwitchStartTime
                ) {
                    this.$message({
                        type: "warning",
                        message: this.$t("minor.tip.signStartError")
                    });
                    //将开始时间清空
                    this.minorConfig.signSwitchStartTime = "";
                    this.minorConfig.signSwitchEndTime = "";
                    //将查询开关关闭、开始时间置为空
                    this.minorConfig.querySwitch = false;
                    this.minorConfig.querySwitchStartTime = "";
                }
            }
            this.updateConfigValue();
        },
        checkSignSwitchEndTime() {
            if (
                this.minorConfig.signSwitchEndTime <=
                this.minorConfig.signSwitchStartTime
            ) {
                this.$message({
                    type: "warning",
                    message: this.$t("minor.tip.signEndError")
                });
                //将结束时间清空
                this.minorConfig.signSwitchEndTime = "";
                //将查询开关关闭、开始时间置为空
                this.minorConfig.querySwitch = false;
                this.minorConfig.querySwitchStartTime = "";
            } else {
                this.updateConfigValue();
            }
        },
        checkQuerySwitchStartTime() {
            if (
                this.minorConfig.querySwitchStartTime <=
                this.minorConfig.signSwitchEndTime
            ) {
                this.$message({
                    type: "warning",
                    message: this.$t("minor.tip.queryConfigError")
                });
                //将开始时间清空
                this.minorConfig.querySwitchStartTime = "";
                this.minorConfig.querySwitchEndTime = "";
            }
            if (!!this.minorConfig.querySwitchEndTime) {
                if (
                    this.minorConfig.querySwitchEndTime <=
                    this.minorConfig.querySwitchStartTime
                ) {
                    this.$message({
                        type: "warning",
                        message: this.$t("minor.tip.queryStartError")
                    });
                    //将开始时间清空
                    this.minorConfig.querySwitchStartTime = "";
                }
            }
            this.updateConfigValue();
        },
        checkQuerySwitchEndTime() {
            if (
                this.minorConfig.querySwitchEndTime <=
                this.minorConfig.querySwitchStartTime
            ) {
                this.$message({
                    type: "warning",
                    message: this.$t("minor.tip.queryEndError")
                });
                //将结束时间清空
                this.minorConfig.querySwitchEndTime = "";
            } else {
                this.updateConfigValue();
            }
        }
    }
};
</script>
<style>
.spanStyle {
    width: 16px;
    margin-left: 32px;
    margin-right: -12px;
    padding-left: 0 !important;
}
.minorGrade {
    font-family: "微软雅黑";
    font-size: 14px;
}
.lineClass {
    border-bottom: 1px solid #ebeef5;
    padding-bottom: 8px;
    margin-bottom: 8px;
}
.pull-left {
    float: left;
}
.pull-right {
    float: right;
}
.clearfull {
    clear: both;
}
</style>


